package branch_and_price;

public class Utils {
    static double c(int i) {
        return Dataset.capacity[i];
    }

    static double[] p_i(int i) {
        int n = Dataset.profit[0].length;
        double[] r = new double[n];
        for (int j = 0; j < n; j++) {
            r[j] = Dataset.profit[i][j];
        }
        return r;
    }

    static double[] w_i(int i) {
        int n = Dataset.cost[0].length;
        double[] r = new double[n];
        for (int j = 0; j < n; j++) {
            r[j] = Dataset.cost[i][j];
        }
        return r;
    }

    static double abs(double a) {
        return (a > 0) ? a : -a;
    }
}
